package com.ac.api.group.vo;

import com.ac.api.group.entity.AcModule;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.List;

/**
 * @Author mzl.
 */
@Data
@ApiModel
public class GroupTypeModuleVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("模块Id")
    private Integer moduleid;

    @ApiModelProperty(value = "模块名称(订单管理、内容管理、业务模块)")
    private String modulename;

    @ApiModelProperty(value = "排序号")
    private Integer modulenumber;

    @ApiModelProperty(value = "描述说明")
    private String description;

    private List<GroupTypeActionVo> actions;

    public GroupTypeModuleVo() {
    }

    public GroupTypeModuleVo(AcModule acModule) {
        if (null != acModule) {
            BeanUtils.copyProperties(acModule, this);
            this.moduleid = acModule.getId();
            this.modulename = acModule.getName();
        }
    }
}
